using System;

namespace Slaks.Graphs.GraphBuilder.Functors
{
	public class SentenceWeightFunctor : IFunctor
	{
		private long m_sentenceNumber;
		public SentenceWeightFunctor(long sentenceNumber)
		{
			m_sentenceNumber = sentenceNumber;
		}
		#region IFunctor Members

		public double GetNodeWeight()
		{
			// TODO:  Add SentenceWeightFunctor.GetEdgeWeight implementation
			if (m_sentenceNumber == 0) return 1;
			return (double) 1 / m_sentenceNumber;
		}

		public double GetEdgeWeight()
		{
			// TODO:  Add SentenceWeightFunctor.GetEdgeWeight implementation
			if (m_sentenceNumber == 0) return 1;
			return (double)1 / m_sentenceNumber;
		}

		#endregion
	}
}
